%
O08700(BALLBAR*RATCHET)
(N-9967-2200-01) 
(COPYRIGHT*2024*RENISHAW*PLC.*ALL*RIGHTS*RESERVED) 
(WARNING!)

(Renishaw cannot guarantee that the part programs supplied are)
(correct.  Anyone using the part programs supplied by this software)
(must ensure that the programs are suitable for the machine/controller)
(on which they are used.  Part programs should only be run by personnel)
(who are fully familiar with the machine, the controller and the)
(operation of all guards, interlocks and emergency stop switches.)
(It is recommended that programs are initially tested at low speed using)
(the feedrate override control.)

G40G69G80G90G17
;
G65P8704A1.
IF[#5043GE0]GOTO110;
#3006=1(Z*POS*WARNING);
N110;
;
#129=1 
IF[#4006EQ21]GOTO5 
IF[#4006EQ71]GOTO5 
#129=1/25.4
N5 
#3=0.5*#129
#4=1.0*#129
#5=1.0 
#6=2500.*#129
#18=[#18*#129]
G65P8704A1.
G54 


IF[#18EQ[100.*#129]]GOTO10 
IF[#18EQ[150.*#129]]GOTO10 
IF[#18EQ[250.*#129]]GOTO10 
IF[#18EQ[300.*#129]]GOTO10 
IF[#18EQ[400.*#129]]GOTO10 
IF[#18EQ[450.*#129]]GOTO10 
IF[#18EQ[550.*#129]]GOTO10 
IF[#18EQ[600.*#129]]GOTO10 


#3000=1(BALLBAR*WRONG*LENGTH) 
N10
G65P8705R#18S#19


G01Z[10.*#129]F#6 
G01X[#18+#4]Y0Z0 
#3006=1(LOAD*BALL*BAR) 
G65P8704A1.
#100=#5041 
#101=0.
#102=0.
G65P8702R[#18+#4]T0.H90. 
G65P8702R#18T0.H90.
G04P#5 
N20(FIRST*CIRCLE)
#10=4. 
#1=0 
WHILE[#1LT#10]DO1
#2=[#1*[360/#10]]
G65P8703F#3R#18T#2H67.5
G04P#5 
#1=#1+1
END1 
N30(SECOND*CIRCLE) 
#10=8. 
#1=0 
WHILE[#1LT#10]DO1
#2=[#1*[360/#10]]+22.5 
G65P8703F#3R#18T#2H45. 
G04P#5 
#1=#1+1
END1 
N40(THIRD*CIRCLE)
#10=4. 
#1=0 
WHILE[#1LT#10]DO1
#2=[#1*[360/#10]]+45.
G65P8703F#3R#18T#2H22.5
G04P#5 
#1=#1+1. 
END1 
N50(FOURTH*CIRCLE) 
#10=8. 
#1=0 
WHILE[#1LT#10]DO1
#2=[#1*[360/#10]]+22.5 
G65P8703F#3R#18T#2H0.
G04P#5 
#1=#1+1
END1 
N60(FIFTH*CIRCLE)
#10=4. 
#1=0 
WHILE[#1LT#10]DO1
#2=#1*[360/#10]
G65P8703F#3R#18T#2H-20.
G04P#5 
#1=#1+1
END1 
G65P8701R[#18+#4]
G65P8702R[#18+#4]T0.H0.
M99

%